package com.imageim.yimirror.ui.adapter;

import android.content.Context;

import com.imageim.yimirror.R;
import com.imageim.yimirror.bean.FashionRecommendBean;
import com.imageim.yimirror.common.ui.GlideUtils;

import org.byteam.superadapter.IMulItemViewType;
import org.byteam.superadapter.SuperAdapter;
import org.byteam.superadapter.SuperViewHolder;

import java.util.List;

/**
 * Created by Yuaihen.
 * on 2018/12/26
 * 时尚趋势界面品牌分类Adapter
 */
public class FashionTrendBrandAdapter extends SuperAdapter<FashionRecommendBean.ListBean> {


    public FashionTrendBrandAdapter(Context context, List<FashionRecommendBean.ListBean> items, int layoutResId) {
        super(context, items, layoutResId);
    }

    public FashionTrendBrandAdapter(Context context, List<FashionRecommendBean.ListBean> items, IMulItemViewType<FashionRecommendBean.ListBean> mulItemViewType) {
        super(context, items, mulItemViewType);
    }

    @Override
    public void onBind(SuperViewHolder holder, int viewType, int layoutPosition, FashionRecommendBean.ListBean item) {
        GlideUtils.display(holder.findViewById(R.id.iv_photo), item.getLogoUrl());
        holder.setText(R.id.tv_brand_name, item.getRecommendName());
        holder.setText(R.id.tv_brand_desc, item.getRecommendDesc());
        holder.setText(R.id.tv_collect_num, item.getLikeNum() + "喜欢");
        holder.setText(R.id.tv_look_num, item.getViewNum() + "浏览");

        //        RelativeLayout rlAttr = holder.findViewById(R.id.rl_attr);
        //        AnimUtil.fashionItemAnim(rlAttr);
    }
}
